﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace PopShops.Entities
{
    public class PriceRange
    {
        #region Public Properties

        [XmlAttribute("min")]
        public long MinPrice { get; set; }
        [XmlAttribute("max")]
        public long MaxPrice { get; set; }
        [XmlAttribute("product_count")]
        public long ProductCount { get; set; }

        #endregion

        #region Ctor

        public PriceRange()
        { }

        public PriceRange(long max, long min, long product_count)
        {
            this.MinPrice = min;
            this.MaxPrice = max;
            this.ProductCount = product_count;
        }

        #endregion
    }

    [XmlRoot("price_ranges")]
    public class PriceRanges
    {
        public PriceRanges()
        { }

        [XmlElement("price_range")]
        public List<PriceRange> PriceRangeCollection { get; set; }
    }
}
